package com.cxyjy.travelguide.service;

import com.cxyjy.common.pojo.PageResult;
import com.cxyjy.common.util.JResponse;
import com.cxyjy.travelguide.controller.vo.ArtifactCreateVO;
import com.cxyjy.travelguide.controller.vo.ArtifactQueryVO;
import com.cxyjy.travelguide.controller.vo.ArtifactRespVO;
import com.cxyjy.travelguide.dal.dataobject.ExternalArtifactDO;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.ProtocolException;
import java.util.List;
import java.util.Map;

/**
 * @Author: jony
 * @Date : 2025/4/29 16:29
 * @VERSION v1.0
 */
public interface TemplateImageService {

    Map<String, Object> uploadTemplateImage(MultipartFile image, String objectCode, String objectName, String classId1, String classId2) throws Exception;

    Map<String, Object> uploadTemplateImage(String urlStr, String objectCode, String objectName, String classId1, String classId2) throws IOException;

    ExternalArtifactDO getArtifact(Integer id);

    @Transactional
    List<String> deleteTemplateImageAndArtifact(String objectCode, boolean delArtifact) throws IOException;

    PageResult<ArtifactRespVO> selectPage(ArtifactQueryVO queryVO);

    Boolean updateArtifact(ArtifactCreateVO saveVO) throws IOException;

}

